#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

int main()
{
	long long num = 0;
	scanf("%lld", &num);

	int count = 0;
	int bit_w = 0;
	long long temp = num;
	while (temp)
	{
		if (abs((temp % 10)) == 2)
		{
			count++;
		}
		bit_w++;
		temp /= 10;
	}

	float B_2 = 0;
	B_2 = count / 1.0 / bit_w;
	if (num < 0)
	{
		B_2 *= 1.5;
	}
	if (num % 2 == 0)
	{
		B_2 *= 2.0;
	}

	printf("B_2: %.2f", B_2 * 100);

	return 0;
}
